/*
 * @Description: 
 * @Author: 月间
 * @Date: 2025-03-23 22:34:26
 * @LastEditTime: 2025-03-23 22:53:18
 * @LastEditors:  
 */
import axios from "axios";

const request = axios.create({
    timeout:8000
})

const api_url = "http://127.0.0.1:8000/api/uploader"
 
export async function mergeFile (data){
	return request({
		url: `${api_url}/file-merge`,
		method: 'PUT',
		data,
	});
};
// 获取上传列表
export async function getUploadList (data){
	return request({
		url: `${api_url}/list`,
		method: 'GET',
		params:data,
	});
};
// 下载文件
export function downloadFile (filename){
	return request({
		url: `${api_url}/download/${filename}`,
		method: 'GET',
		responseType: 'blob',
	});
};
// 删除文件
export function deleteFile (identifier){
	return request({
		url: `${api_url}/remove/${identifier}`,
		method: 'DELETE',
	});
};